@mixin ellipsis($line: 1) {

  /* autoprefixer: ignore next */
  display: box;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-all;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: $line;
}

@mixin hover-active {
  cursor: pointer;

  &:hover,
  &.active {
    color: var(--color-primary);

    .app-icon-common {
      color: var(--color-primary);
    }
  }

  &:hover {
    background-color: #eef3f9;
  }
}

@mixin break-word {
  white-space: normal;
  word-wrap: break-word;
  word-break: break-all;
}

@mixin absolute-box {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

@mixin multi-ellipsis($lines: 1) {
  display: box;
  overflow: hidden;
  text-overflow: ellipsis;

  /* autoprefixer: ignore next */
  -webkit-line-clamp: $lines;
  -webkit-box-orient: vertical;
}

@mixin ellipsis-line() {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

@mixin clear-fix() {
  &::after {
    display: table;
    clear: both;
    content: '';
  }
}

@mixin hairline-common() {
  position: absolute;
  box-sizing: border-box;
  content: ' ';
  pointer-events: none;
}

@mixin hairline($color: var(--border-color)) {
  @include hairline-common;
  top: -50%;
  right: -50%;
  bottom: -50%;
  left: -50%;
  border: 0 solid $color;
  transform: scale(0.5);
}

@mixin hairline-top($color: var(--border-color), $left: 0) {
  @include hairline-common;
  top: 0;
  right: 0;
  left: $left;
  border-top: 1px solid $color;
  transform: scaleY(0.5);
}

@mixin hairline-bottom($color: var(--border-color), $left: 0) {
  @include hairline-common;
  right: 0;
  bottom: 0;
  left: $left;
  border-bottom: 1px solid $color;
  transform: scaleY(0.5);
}

@mixin absolute() {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}

@mixin flex-column {
  display: flex;
  flex-direction: column;
}

@mixin flex-row {
  display: flex;
  flex-direction: row;
}

@mixin flex-item {
  flex: 1 1 auto;
}

@mixin flex-item-relative {
  @include flex-item;
  position: relative;
}

@mixin clickable {
  cursor: pointer;

  &:hover {
    color: var(--color-primary);
    text-decoration: underline;
  }

  & + & {
    margin-left: 10px;
  }
}

@mixin flex-not-shrink {
  flex-shrink: 0;
}

@mixin border-bottom {
  border-bottom: 1px solid var(--border-color);
}

@mixin box-shadow {
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
}

@mixin box-shadow-popover {
  box-shadow: 0 0 10px 0 #acacac;
}
